program testArrayAssignmentValid;
class testArrayAssignmentValid

BEGIN

VAR XRay : ARRAY[0 .. 4] OF integer;
	YRay : ARRAY[8 .. 12] OF integer;
	ZZ   : integer;    
	XX   : integer;    
	YY   : integer;    

FUNCTION testArrayAssignmentValid;
BEGIN
	XRay := YRay;
	ZZ := ZZ + XX;
	this.testArrayAssignmentValid0
END;

FUNCTION testArrayAssignmentValid0;
BEGIN
	XRay := YRay;
	WHILE ZZ < 8 DO
BEGIN
	ZZ := ZZ + 1;
	YY := 1
END
END

END

class class2

BEGIN

VAR XRay : ARRAY[0 .. 4] OF integer;
	YRay : ARRAY[8 .. 12] OF integer;
	ZZ   : integer;
	XX   : integer;
	YY   : integer;

FUNCTION testArrayAssignmentValid;
BEGIN
	XRay := YRay;
	ZZ := ZZ + XX;
	WHILE ZZ < 7 DO
	ZZ := ZZ + 1;

	YY := ZZ + XX
END;

FUNCTION testArrayAssignmentValid0;
BEGIN
	XRay := YRay;
	WHILE ZZ < 8 DO
BEGIN
	ZZ := ZZ + 1;
	YY := 1
END
END

END




														       .
